/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ejb;

import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;

/**
 *
 * @author sp116900
 */
@Stateless
public class GestoreVideogameBean implements GestoreVideogameBeanLocal {
    @EJB
    private VideogameFacadeLocal videogameFacade;
    
    @Override
    public List<Videogame> findVideogame(){
        List<Videogame> al=videogameFacade.findAll();
        return al;
    }
    
    @Override
    public void addVideogame(String nome){
        Videogame v=new Videogame();
        v.setNome(nome);
        videogameFacade.create(v);
   }

    // Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Business Method")

}
